#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>

int main()
{
	int sockfd = socket(AF_UNIX , SOCK_DGRAM , 0);
	struct sockaddr_un addr;
	addr.sun_family = AF_UNIX;
	strcpy(addr.sun_path , "a.sock");
	connect(sockfd , (struct sockaddr*)&addr , sizeof(addr));
	while(1)
	{	
		char buf[100] = {};
		scanf("%s",buf);
		int res = write(sockfd , buf, sizeof(buf));		
	}

	close(sockfd);
}
